package com.kimoge.spring6.ioc.life;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author kimoge
 * @date 2025/8/25
 * @description
 */
public class MyPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("生命周期：3、后置处理器-初始化对象之前");
        return BeanPostProcessor.super.postProcessBeforeInitialization(bean, beanName);
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("生命周期：5、后置处理器-初始化对象之后");
        return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
    }
}
